<!DOCTYPE html>
<html class="x-admin-sm">

<head>
  <meta charset="UTF-8">
  <title>欢迎页面</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
    content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
  <link rel="stylesheet" href="../css/admin/font.css">
  <link rel="stylesheet" href="../css/admin/xadmin.css">
  <script src="../js/layui/layui.js" charset="utf-8"></script>
  <script type="text/javascript" src="../js/xadmin.js"></script>
  <script type="text/javascript" src="../js/jquery-3.2.1/jquery-3.2.1.min.js"></script>
  <script type="text/javascript" src="../js/checkAdmin.js"></script>

</head>


<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-body ">
            <blockquote class="layui-elem-quote" style="font-size:x-large;">欢迎管理员：
              <span class="x-red" id="account"></span>
              <span id="tt"></span> 
            </blockquote>
          </div>
        </div>
      </div>
    </div>
  </div>
</body>

</html>
<script>
  $(function () {

    var myDate = new Date;
    var year = myDate.getFullYear(); //获取当前年
    var mon = myDate.getMonth() + 1; //获取当前月
    var date = myDate.getDate(); //获取当前日
    // var h = myDate.getHours();//获取当前小时数(0-23)
    // var m = myDate.getMinutes();//获取当前分钟数(0-59)
    // var s = myDate.getSeconds();//获取当前秒
    var week = myDate.getDay();
    var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
    $(".layui-elem-quote #tt").html('！&nbsp;当前时间:'+ year + "年" + mon + "月" + date + "日" +'&nbsp;&nbsp;'+ weeks[week]);

    var storage = window.sessionStorage;
    // 先将json字符串转化为对象
    var obj = JSON.parse(storage.getItem('admin'));
    $('#account').html(obj.account);


    
  })
</script>